package com.smartj.autowire;

import lombok.Data;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 *
 */
@Component
@Data
@ToString
public class User {

    @Resource(
            name = "address"
    )
    Address address;

    @Value("ZhangSan")
    private String name;

    //@Value()
    private Integer randomValue;
}
